#include <stdio.h>

#define Base 1000000
#define Num 20

int mult[(2 * Num + 5) / 6];//乘积
int n[Num];
int m[Num];

//读入大数
int ReadNum(int a[Num]) {
    int InNum, i, len;
    InNum = 0;
    i = 0;
    len = 0;
    while ((InNum = fgetc(stdin)) != EOF && InNum != '\n') {
        if (i < Num) {
            a[i++] = InNum - '0';
            len++;
        } else
            break;
    }
    return len;
}

int MultNum(int l) {
    int InNum, i, j, len, carry, k;
    InNum = 0;
    j = 0;
    carry = 0;
    for (i = 0; i < (2 * Num + 5) / 6; ++i) {
        mult[i] = 0;//初始化乘积数组
    }
}

void PrintNum() {
    int i;
    for (i = 0; i <= (2 * Num); ++i) {
        if (mult[i] != 0)
            printf("%06d ", mult[i]);
    }
    printf("\n");
}

int main(int argc, char *argv[]) {
    int lenN;
    if (argc < 1)
        return 1;
    lenN = ReadNum(n);
    ReadNum(m);
    MultNum(lenN);
    PrintNum();
}